package com.pls.entity;

import java.util.ArrayList;
import java.util.List;

import com.pls.data.EmployeeSeatData;

public class EmployeeSeat {

	// Instance Fields
	private int seatID;
	private SeatType seatType;
	private String seatCode;
	private String positionCode;
	private String quadrant;
	private String localNo;
	private String floor_level;
	private int col;
	private int row;
	private Location location;
	private Employee employee;
	private boolean isExist;

	// Getters and Setters
	public String getFloor_level() {
		return floor_level;
	}

	public void setFloor_level(String floor_level) {
		this.floor_level = floor_level;
	}

	public int getSeatID() {
		return seatID;
	}

	public void setSeatID(int seatID) {
		this.seatID = seatID;
	}

	public SeatType getSeatType() {
		return seatType;
	}

	public void setSeatType(SeatType seatType) {
		this.seatType = seatType;
	}

	public String getSeatCode() {
		return seatCode;
	}

	public void setSeatCode(String seatCode) {
		this.seatCode = seatCode;
	}

	public String getPositionCode() {
		return positionCode;
	}

	public void setPositionCode(String positionCode) {
		this.positionCode = positionCode;
	}

	public String getQuadrant() {
		return quadrant;
	}

	public void setQuadrant(String quadrant) {
		this.quadrant = quadrant;
	}

	public String getLocalNo() {
		return localNo;
	}

	public void setLocalNo(String localNo) {
		this.localNo = localNo;
	}

	public int getCol() {
		return col;
	}

	public void setCol(int col) {
		this.col = col;
	}

	public int getRow() {
		return row;
	}

	public void setRow(int row) {
		this.row = row;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public void checkSeatExistence(String seatCode) {

		EmployeeSeatData data = new EmployeeSeatData();
		List<EmployeeSeat> employeeSeats = data
				.getEmployeeSeatBySeatCode(seatCode);

		if (employeeSeats != null) {
			this.isExist = true;
		}

		else {
			this.isExist = false;
		}
	}

	public boolean isExist() {
		return isExist;
	}
	
	
}
